package com.luotianacg.mode.strategyDesignPattern;

/**
 * @Author: luotian
 * @Date: 2023/4/5 21:39
 */
public abstract class Duck {
    private String name;
    FlyBehavior flyBehavior;
    HonkBehavior honkBehavior;
    public void fly()
    {
        flyBehavior.fly();
    }

    /**
     * 展示是什么鸭
     */
    public abstract  void display();

    public void setFlyBehavior(FlyBehavior fly)
    {
        flyBehavior=fly;
    }
}
